﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tsual.Wechat.Message.Interface.Response
{
    public interface IWechatResponseMessage
    {
        string ToUserName { get; set; }
        string FromUserName { get; set; }
        int CreateTime { get; set; }
    }

    public interface IWechatMessageHandleResult
    {

    }

    public interface IWechatResponseText : IWechatResponseMessage, IWechatMessageHandleResult
    {
        string Content { get; set; }
    }

    public interface IWechatResponseMedia : IWechatResponseMessage
    {
        string MediaId { get; set; }
    }

    public interface IWechatResponseImage : IWechatResponseMedia, IWechatMessageHandleResult
    {
    }

    public interface IWechatResponseVoice : IWechatResponseMedia, IWechatMessageHandleResult
    {
    }

    public interface IWechatResponseVideo : IWechatResponseMedia, IWechatMessageHandleResult
    {
        string Title { get; set; }
        string Description { get; set; }
    }

    public interface IWechatResponseMusic : IWechatResponseMessage, IWechatMessageHandleResult
    {
        string Title { get; set; }
        string Description { get; set; }
        string MusicUrl { get; set; }
        string HQMusicUrl { get; set; }
        string ThumbMediaId { get; set; }
    }

    public interface IWechatResponseArticleItem
    {
        string Title { get; set; }
        string Description { get; set; }
        string PicUrl { get; set; }
        string Url { get; set; }
    }

    public interface IWechatResponseNews : IWechatResponseMessage, IWechatMessageHandleResult
    {
        int ArticleCount { get; set; }
        IEnumerable<IWechatResponseArticleItem> Articles { get; set; }
    }
}

namespace Tsual.Wechat.Message.Interface.Request
{
    public interface IWechatMessageRequestModel : IWechatRequestMessage, IWechatRequestText, IWechatRequestMedia, IWechatRequestThumbMedia, IWechatRequestImage, IWechatRequestVideo, IWechatRequestShortVideo, IWechatRequestVoice, IWechatRequestRecognitionVoice, IWechatRequestLocation, IWechatRequestLink, IWechatRequestEvent
    {
        string MsgType { get; set; }
    }
    /// <summary>
    /// 可处理的消息类型
    /// </summary>
    public interface IWechatHandlableMessageRequest
    {
        WechatRequestMsgTypes MessagesType { get; }
    }
    /// <summary>
    /// 微信消息
    /// </summary>
    public interface IWechatRequestMessage
    {
        string ToUserName { get; set; }
        string FromUserName { get; set; }
        int CreateTime { get; set; }
        ulong MsgId { get; set; }
    }
    /// <summary>
    /// 事件
    /// </summary>
    public interface IWechatRequestEvent : IWechatRequestMessage, IWechatHandlableMessageRequest
    {
        string Event { get; set; }
        string EventKey { get; set; }
        string Ticket { get; set; }
        double Latitude { get; set; }
        double Longitude { get; set; }
        double Precision { get; set; }
    }
    /// <summary>
    /// 文本消息
    /// </summary>
    public interface IWechatRequestText : IWechatRequestMessage, IWechatHandlableMessageRequest
    {
        string Content { get; set; }
    }

    public interface IWechatRequestMedia : IWechatRequestMessage
    {
        string MediaId { get; set; }
    }

    public interface IWechatRequestThumbMedia : IWechatRequestMedia
    {
        string ThumbMediaId { get; set; }
    }
    /// <summary>
    /// 图片
    /// </summary>
    public interface IWechatRequestImage : IWechatRequestMedia, IWechatHandlableMessageRequest
    {
        string PicUrl { get; set; }
    }
    /// <summary>
    /// 视频
    /// </summary>
    public interface IWechatRequestVideo : IWechatRequestThumbMedia, IWechatHandlableMessageRequest
    {
    }
    /// <summary>
    /// 短视频
    /// </summary>
    public interface IWechatRequestShortVideo : IWechatRequestThumbMedia, IWechatHandlableMessageRequest
    {
    }
    /// <summary>
    /// 语音
    /// </summary>
    public interface IWechatRequestVoice : IWechatRequestMedia, IWechatHandlableMessageRequest
    {
        string Format { get; set; }
    }
    /// <summary>
    /// 识别的语音
    /// </summary>
    public interface IWechatRequestRecognitionVoice : IWechatRequestVoice, IWechatHandlableMessageRequest
    {
        string Recognition { get; set; }
    }
    /// <summary>
    /// 位置
    /// </summary>
    public interface IWechatRequestLocation : IWechatRequestMessage, IWechatHandlableMessageRequest
    {
        double Location_X { get; set; }
        double Location_Y { get; set; }
        double Scale { get; set; }
        string Label { get; set; }
    }
    /// <summary>
    /// 超链接
    /// </summary>
    public interface IWechatRequestLink : IWechatRequestMessage, IWechatHandlableMessageRequest
    {
        string Title { get; set; }
        string Description { get; set; }
        string Url { get; set; }
    }
}
